package com.DHH.Service.Base.Impl;
import com.DHH.Entity.Base.BaseThirdpartyLogin;
import com.DHH.Mapper.Base.BaseThirdpartyLoginMapper;
import com.DHH.Service.Base.IBaseThirdpartyLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BaseThirdpartyLoginServiceImpl implements IBaseThirdpartyLoginService{
	
	@Autowired
    private BaseThirdpartyLoginMapper baseThirdpartyLoginMapper;
    
   @Override
   public BaseThirdpartyLogin insertBaseThirdpartyLogin(BaseThirdpartyLogin baseThirdpartyLogin){
	   
        baseThirdpartyLoginMapper.insertSelective(baseThirdpartyLogin);
	   return baseThirdpartyLogin;
	   
   };
   @Override
   public BaseThirdpartyLogin updateBaseThirdpartyLogin(BaseThirdpartyLogin baseThirdpartyLogin){
	     baseThirdpartyLoginMapper.updateByPrimaryKeySelective(baseThirdpartyLogin);
        return baseThirdpartyLogin;
   };
   @Override
   public BaseThirdpartyLogin deleteBaseThirdpartyLogin(BaseThirdpartyLogin baseThirdpartyLogin){

	     baseThirdpartyLoginMapper.delete(baseThirdpartyLogin);
        return baseThirdpartyLogin;
   };
    /**
     * 保存或更新操作，返回值为主表
     */
    public BaseThirdpartyLogin saveOrUpdateBaseThirdpartyLogin(BaseThirdpartyLogin baseThirdpartyLogin){
        if(baseThirdpartyLogin.getId()==null)
        {
            baseThirdpartyLoginMapper.insertSelective(baseThirdpartyLogin);
        }else{
            baseThirdpartyLoginMapper.updateByPrimaryKeySelective(baseThirdpartyLogin);
        }
        return baseThirdpartyLogin;
    };
}
